# encoding=utf-8
"""
封装游内部的指令

"""

def ins_take_money():
    return ['{"id":"100051","cmd":"do_find"}']
    
def ins_random_task():
    return ['{"id":"100051","cmd":"random_task"}']

def ins_register(uname, pwd):
    return ['{"id":"110003","user":"'+ uname +'","psd":"'+ pwd +'","param_a":""}']

def ins_login(uname, pwd):
    # Login server
    return ['{"id":"100001", "user":"'+ uname +'","psd":"' + pwd +'",   \
            "version":"1.2.4","version_android":"1.1.6",                \
            "version_ios":"1.0.8","isNative":0,"os":"Mac OS"}']

def ins_newguide():
    ins = [ '{"id":"100051","cmd":"story 22"}',
            '{"id":"100051","cmd":"newguide 2"}',
            '{"id":"100051","cmd":"newguide 3"}',
            '{"id":"100051","cmd":"newguide 4"}',
            '{"id":"100051","cmd":"newguide 5"}',
            '{"id":"100051","cmd":"newguide 12"}']
    for x in range(37, 128):
        ins.append('{"id":"100051","cmd":"newguide '+ str(x) +'"}')

    return ins

def ins_talk_switch():
    return ['{"id":"100051","cmd":"talk_switch stranger"}',
            '{"id":"100051","cmd":"talk_switch arena"}',
            '{"id":"100051","cmd":"talk_switch area"}',
            '{"id":"100051","cmd":"talk_switch group"}']

#############################################
# Maps
#############################################

def to_jinghu():
    ''' 到镜湖
    '''
    return ['{"id":"100003","cmd":"goto xinshou/zhengqian"}']

def to_kezhan():
    return ['{"id":"100003","cmd":"goto xinshou/kezhan"}']
    